package com.zhl.parameter;

public class MethodDemo2 {
    public static void main(String[] args) {
        //目的掌握引用类型的参数传递：值传递的
        int[] arr = {2, 3, 4, 5};
        changeArray(arr);
        System.out.println("main method: " + arr[2]);

    }

    public static void changeArray(int[] arr) {
        System.out.println("before change: " + arr[2]);
        arr[2] = 10;         //修改数组元素的值
        System.out.println("after change: " + arr[2]);
    }
}
